#include <iostream>
#include <gtest/gtest.h>
#include <unordered_map>
#include <string>

class MyTest : public testing::Test
{
public:
    static void SetUpTestCase()
    {
        std::cout << "所有单元测试前执行，初始化总环境!\n";
    }
    static void TearDownTestCase()
    {
        std::cout << "所有单元测试完毕，清理总环境!\n";
    }

public:
    std::unordered_map<std::string, std::string> _mymap;
};

TEST_F(MyTest, insert_test)
{
    _mymap.insert(std::make_pair("hello", "你好"));
    _mymap.insert(std::make_pair("bye", "再见"));
}

TEST_F(MyTest, size_test)
{
    ASSERT_EQ(_mymap.size(), 2);
}

int main(int argc, char *argv[])
{
    testing::InitGoogleTest(&argc, argv);
    RUN_ALL_TESTS();
    return 0;
}